<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
           padding: 0;
           margin: 0;
        }
        body{
            font-size: 12px;
            display: flex;
            justify-content:center;
            align-items: center;
            min-height: 100vh;
        }
        .box{
            width:10em;
            height: 10em;
            position: relative;
        }
       .box > div{
            position:absolute;
        }
        .box > div:nth-child(odd)
        {
            width:20%;
            height: 100%;
        }
        .box > div:nth-child(even)
        {
            width:100%;
            height: 20%;
        }
        .box > div:nth-child(1)
        {
            left: 10%;
            background-color:hsla(240, 100%, 50%, 0.8);
        }
        .box > div:nth-child(2)
        {
            top: 10%;
            background-color:hsla(300, 100%, 50%, 0.8);
        }
        .box > div:nth-child(3)
        {
            right: 10%;
            background-color:hsla(0, 100%, 50%, 0.8);
        }
        .box > div:nth-child(4)
        {
            bottom: 10%;
            background-color:hsla(60, 100%, 50%, 0.8);
        
    </style>
</head>
<body>
   <div class="box">
       <div></div>
       <div></div>
       <div></div>
       <div></div>
   </div> 
</body>
</html>